/**
 * 
 */
package profile.report;

import profile.result.ResultsComparator;
import profile.result.ProfileResults;

/**
 * @author ductrung.tran
 *
 */
public class DefaultResultsComparator implements ResultsComparator {

	private ResultsReportPrinter reportPrinter = new HtmlReportPrinter();
	
	/* (non-Javadoc)
	 * @see profile.result.ResultsComparator#compare(aspect.TestResults, aspect.TestResults)
	 */
	public void compare(ProfileResults firstResults, ProfileResults secondResults) {
		reportPrinter.print(doCompare(firstResults, secondResults));
	}

	private ResultsReport doCompare(ProfileResults actualResults, ProfileResults otherResults) {
		ResultsReport resultsReport = new ResultsReport();
		resultsReport.addFirstResults(actualResults);
		resultsReport.addSecondResults(otherResults);
		
		return resultsReport;
	}
}
